/**
 * @file model_desc_internal.h
 *
 * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#ifndef ACL_MODEL_DESC_INTERNAL_H
#define ACL_MODEL_DESC_INTERNAL_H

#include "acl_base.h"
#include "acl_mdl.h"
#include "vector.h"

#define ACL_MAX_TENSOR_NAME_LEN 128
#define ACL_MAX_DIM_CNT 128

typedef struct {
  void *weightPtr;
  void *modelDescPtr;
  void *kernelPtr;
  void *kernelArgsPtr;
  void *staticTaskPtr;
  void *dynamicTaskPtr;
  void *fifoTaskPtr;
} aclmdlExeOMInfo;

struct aclmdlConfigHandle {
  int32_t priority;
  size_t mdlLoadType;
  char *loadPath;
  void *mdlAddr;
  size_t mdlSize;
  uint64_t attrState;
  size_t memType;
  aclmdlExeOMInfo exeOMInfo;
  aclmdlExeOMDesc exeOMDesc;
};

struct aclmdlExecConfigHandle {
  void *workPtr;
  size_t workSize;
  size_t mpamId;
  size_t aicQos;
  size_t aicOst;
  size_t mecTimeThreshHold;
};

typedef struct {
  char *name;
  size_t size;
  aclFormat format;
  aclDataType dataType;
  Vector dims;
} aclmdlTensorDesc;

struct aclmdlDesc {
  uint32_t modelId;
  Vector inputDesc;
  Vector outputDesc;
};

#endif  // ACL_MODEL_DESC_INTERNAL_H
